<?php defined('SYSPATH') or die('No direct script access.');

class Controller_Backend extends Controller_Base {
    
    public $template = 'backend/v_base';
    
    public function before() 
    {
        parent::before();

        if( ! $this->auth->logged_in('admin') AND Request::current()->uri() !== 'login')
            $this->request->redirect('login');
               
        $this->template->styles[] = 'media/css/admin_main.css'; 
        $this->template->styles[] = 'media/css/bootstrap-editable.css';

        $this->template->scripts[] = 'media/js/moment.min.js';
        $this->template->scripts[] = 'media/js/bootstrap-editable.min.js';
        $this->template->scripts[] = 'media/js/jquery.multifile.pack.js';
        $this->template->scripts[] = 'media/js/admin_main.js';
        
    }

}
